<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>login</title>
	<link rel="stylesheet" href="http://127.0.01/jmshop/template/default/css/login.css" />
	<script type="text/javascript" src="http://127.0.01/jmshop/template/default/js/jquery-1.8.2.min.js"></script>
	<link rel="stylesheet" type="text/css" href="http://127.0.01/jmshop/Static/hdjs/hdjs.css">
	<script type="text/javascript" src="http://127.0.01/jmshop/Static/hdjs/hdjs.min.js"></script>
	<script type="text/javascript">
	$(function(){
		// alert(1);
		$('.login').validate({
			//表单name值
			username:{
				//规则
				rule:{
					//必填
					required: true,
					minlen:5,
					ajax:{url:"<?php echo U('Index/Login/validate_username');?>"}
				},
				//错误信息
				error:{
					required:'必填',
					minlen:'最短5个字符'
				},
				//成功提示
				success:'正确',
				message:'请填写用户名',
			},
			code:{
				rule:{
					required:true
				},
				error:{
					required:"必填",
				},
				success:'正确',
				message:'请输入验证码',
			}
		})

	})



	</script>
</head>
<body>
	<!-- 头部开始 -->
	<div id="head">
		<a href="<?php echo U('Index/Index/index');?>" class="head_left"><img src="http://127.0.01/jmshop/template/default/image/logo_new_v1.jpg" alt="" /></a>
		<div class="head_right">
			<a href="" class="zhenpin"></a>
			<a href="" class="baoyou"></a>
			<a href="" class="shanfa"></a>
		</div>
	</div>
	<!-- 头部结束 -->
	<!-- 中间部分 -->
	<div id="middle">
		<div class="middle_left"></div>
		<div class="middle_right">
			<div class="shadow_left"></div>
			<div class="form">
				<div class="form_head">
					<h2>登陆聚美</h2>
					<span>还没有聚美账号?</span>
					<a href="<?php echo U('Index/Reg/index');?>">30秒注册</a>
					<form action="<?php echo U('Index/Login/login');?>" class="login" method="post">
						<div class="username"><span class="ren"></span><input type="text" class="uname" name="username" value="" placeholder="用户名" autocomplete="off"/><span id="hd_username"></span></div>

						<div class="password"><span class="lock"></span><input type="password" class="pwd" name="password" value="" placeholder="登录密码" autocomplete="off"/></div>
						<div class="code_yanzheng"><input type="text" class="code" name="code" value="" placeholder="验证码"/><img src="<?php echo U('Index/Login/code');?>" alt="" onclick="this.src=this.src+'&'+Math.random()"/><a href="" class="tishi">换一张</a><span id="hd_code"></span></div>
						<div class="qitian">
							<input type="checkbox" class="session" name="auto" />
							<span>七天登陆</span>
						</div>
						<input type="submit" value="登录" class="denglu" />

					</form>
				</div>
			</div>
			<div class="shadow_right"></div>
			
		</div>
		
	</div>
	<!-- 中间部分结束 -->
	
</body>
</html>